<!--content begin-->
	<div class="bh-ly-jj-zhuce bh-padT10 bh-content">
		<div class="bh-page-index-jj">
			<div class="bh-zhhmm-xf">
				<?php echo $this->renderPartial('application.views.partials.order.schedule');?>
				<div class='order-wrapper order-scenic'>
				<?php $form = $this->beginWidget('lib.widgets.CActiveFormAdv')?>
	    		<?php echo $form->hiddenField($model,'items.related_id')?>
	    		<?php echo $form->hiddenField($model,'items.goods_id')?>
	    		<?php echo $form->hiddenField($model,'items.provider_id')?>
	    		<?php echo $form->hiddenField($model,'items.dealer_id')?>
	    		<?php echo $form->hiddenField($model,'items.item_price',array('id'=>'price'))?>
					<div class='order-part-wrapper'>
						<table class='order-part'>
							<tr>
								<th width=130px>预订门票：</th>
								<td class='bh-strong'>
									<?php echo CHtml::link(
										CHtml::value($model, 'items.goods.profile.company.name'),
										$this->createUrl('scenicView',array('id'=>CHtml::value($model, 'items.goods.profile.company.id'))),
										array('target'=>'_blank','class'=>'a-blue')
									)?>
									<?php echo CHtml::value($model, 'items.goods.fullTitle')?>
								</td>
							</tr>
							<tr><th>门票说明：</th><td><?php echo CHtml::value($model, 'items.goods.profile.tickets_notice')?></td></tr>
							<tr>
								<th>游玩日期：</th>
								<td>
									<?php $this->widget('coms.ui.DataPicker', array(
										'model' => $model,
										'attribute' => 'profile.play_time',
										'htmlOptions' => array(
											'class' => 'bh-ydxx-input-jj',
											'value' => date('Y-m-d',strtotime('+1day'))
										),
										'options' => array('minDate'=>'%y-%M-%d')
									));?>
									<?php echo $form->error($model, 'profile.play_time')?>
									<span class='fc-666 bh-font12'> 您可于16:00之前预订当天门票</span>
								</td>
							</tr>
							<tr>
								<th>预定张数：</th>
									<td>
									<?php echo $form->dropDownList($model, 'items.item_num',Yii::app()->enum->options('num',false),array('id'=>'item-num'))?> 张
									<span class='bh-fr font-clr bh-font14'><?php echo CHtml::value($model, 'items.item_price')?>元 × <span id='order-ticket-num'>1</span></span>
								</td>
							</tr>
							<tr><th>&nbsp;</th><td class='scenic-price-cell bh-strong'>总价：<span class='font-clr bh-font18'><label id='money'><?php echo CHtml::value($model, 'items.item_price')?></label>元</span></td></tr>
						</table>
					</div>
					
					<div class='order-part-wrapper'>
						<table class='order-part'>
							<tr width=130px>
								<th><span class='required'>*</span>支付类型：</th>
								<td> <?php echo $form->dropDownList($model, 'pay_type',Yii::app()->enum->options('order.payType'))?>
									<?php echo $form->error($model, 'pay_type');?>
								</td>
							</tr>
							<tr>
								<th width=130px><span class='required'>*</span>取票人姓名：</th>
								<td>
									<?php echo $form->textField($model,'receiverInfo.receiver',array('id'=>'c-name'))?>
									<?php echo $form->error($model, 'receiverInfo.receiver')?>
									<span class='hint'>(输入姓名须与身份证上一致，取票时须出示身份证)</span>
									</td>
							</tr>
							<tr>
								<th><span class='required'>*</span>取票人手机号码：</th>
								<td>
									<?php echo $form->textField($model,'receiverInfo.mobile',array('id'=>'c-mobile'))?>
									<?php echo $form->error($model, 'receiverInfo.mobile')?>
								 	<span class='hint'>(免费接收订单确认短信，请务必填写正确)</span>
								</td>
							</tr>
							<tr class='space-row'></tr>
							<tr>
								<th><span class='required'>*</span>预订人姓名：</th>
								<td>
									<?php echo $form->textField($model,'profile.name',array('id'=>'name'))?>
									<?php echo $form->error($model, 'profile.name')?>
									<a href='javascript:void(0)' class='a-blue bh-font12' id='copy-content'>[点此复制取票人信息]</a>
								</td>
							</tr>
							<tr>
								<th><span class='required'>*</span>预订人手机号码：</th>
								<td>
									<?php echo $form->textField($model,'profile.mobile',array('id'=>'mobile'))?>
									<?php echo $form->error($model, 'profile.mobile')?>
								</td>
							</tr>
						</table>
					</div>
					
					<div class="submit_order">
						<input class="submit_btn" type="submit" value=' '/>
					</div>
					<?php $this->endWidget();?>
					<div class='order-part-wrapper'>
						<div class='scenic-order-notice'>
							<?php echo CHtml::value($model, 'items.goods.profile.company.ticketing_information')?>							
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
<script>
$('#item-num').change(function() {
	val = $(this).val();
	$('#order-ticket-num').html(val);
	$('#money').html($('#price').val()*val);
});
$('#copy-content').click(function() {
	$('#name').val($('#c-name').val());
	$('#mobile').val($('#c-mobile').val());
});
</script>